package com.springboot2.authresource;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author miaoyang
 */
@EnableResourceServer
@EnableEurekaClient
@SpringBootApplication
@RestController
public class AuthResourceApplication {

    public static void main(String[] args) {
        SpringApplication.run(AuthResourceApplication.class, args);
    }

    @GetMapping("index")
    public String index() {
        return "auth-resource";
    }
}
